<template>
	<view class="apply-record">
		<titlebara img="https://pfmotortest.hb4oss.xstore.ctyun.cn/appstatic/community/explain-icon.png" mode=""
			:backToIndex="false" :back="true" text="申请记录" backgroundColor='#f5f5f5'
			@rightIconClick="toPageInstructions"></titlebara>
		<z-paging ref="paging" v-model="dataList" @query="getApplyLogListAPP" :fixed='false'
			:height='(windowHeight)+"px"' :style="'padding-top:'+ navigationBarHeight">
			<view class="list-box"  >
				<div class="items" v-for="(item, index) in dataList" :key='index' @click="toDetail(item)">
					<view class="items_info">
						<view class="l-title">{{item.masterName}}</view>
						<view class="l-time">{{item.applyTime}}</view>
					</view>

					<u-icon name="arrow-right" color="#ADB0AE" size="20"></u-icon>
				</div>
			</view>
		</z-paging>

	</view>
</template>

<script>
	const app = getApp();
	const network = require("@manager/network-manager.js");
	const dialog = require("../../../utils/dialog.js");
	import titlebara from '@/components/titlebar/titlebar'
	export default {
		components: {
			titlebara
		},
		data() {
			return {
				value: true,
				navigationBarHeight: app.globalData.statusBarHeight + 44 + 'px',
				windowHeight: app.globalData.windowHeight,
				dataList: []

			};
		},
		onLoad(options) {

		},
		methods: {
			//查询申请记录列表（APP）
			getApplyLogListAPP: function(pageNo, pageSize) {
				var that = this;
				var uri = app.globalData.config.interfaces
					.URL_USERMASTER_GETAPPLYLOGLISTAPP;
				var params = {
					"pageNum": pageNo,
					"pageSize": pageSize
				};
				network.get(uri, params, 'form').then(res => {
					if (res.code == 200) {
						that.dataList = res.data.list;
						that.$refs.paging.complete(that.dataList);
					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}
				})
			},
			//跳转达人说明
			toPageInstructions: function() {
				uni.navigateTo({
					url: '/module_my/pages/expertCertification/expertInstructions'
				})
			},
			//跳转详细
			toDetail: function(item) {
				uni.navigateTo({
					url: '/module_my/pages/expertCertification/applyDetails?id=' + item.id
				})
			}

		}


	}
</script>

<style lang='scss' scoped>
	.apply-record {
		width: 100vw;
		min-height: 100vh;
		box-sizing: border-box;
		background: #EDEDED url(@appstatic/img/my/bg-img.jpg) no-repeat;
		background-position: 0 0;
		background-size: 100%;
		background-attachment: fixed;

		.list-box {
			.items {
				width: 100%;
				box-sizing: border-box;
				padding: 32rpx 40rpx 32rpx 48rpx;
				position: relative;
				display: flex;
				flex-direction: row;
				align-content: center;
				justify-content: space-between;

				.items_info {
					display: flex;
					flex-direction: column;
					.l-title {
						font-size: 32rpx;
						line-height: 46rpx;
						color: #3D3A3A;
					}

					.l-time {
						font-size: 28rpx;
						line-height: 32rpx;
						color: #ADB0AE;
						margin-top: 16rpx;
					}
				}


				.u-icon--right {
				/* 	position: absolute;
					right: 40rpx;
					top: 32rpx; */
				}
			}
		}
	}
</style>
